import 'package:json_annotation/json_annotation.dart';

part 'notify_list_model.g.dart';


@JsonSerializable()
class NotifyListModel extends Object {

  @JsonKey(name: 'code')
  int code;

  @JsonKey(name: 'message')
  String message;

  @JsonKey(name: 'data')
  NotifyData notifyData;

  NotifyListModel(this.code,this.message,this.notifyData,);

  factory NotifyListModel.fromJson(Map<String, dynamic> srcJson) => _$NotifyListModelFromJson(srcJson);

  Map<String, dynamic> toJson() => _$NotifyListModelToJson(this);

}


@JsonSerializable()
class NotifyData extends Object {

  @JsonKey(name: 'data')
  List<NotifyItem> notifyList;

  @JsonKey(name: 'pages')
  Pages pages;

  NotifyData(this.notifyList,this.pages,);

  factory NotifyData.fromJson(Map<String, dynamic> srcJson) => _$NotifyDataFromJson(srcJson);

  Map<String, dynamic> toJson() => _$NotifyDataToJson(this);

}


@JsonSerializable()
class NotifyItem extends Object {

  @JsonKey(name: 'notice_type')
  String noticeType;

  @JsonKey(name: 'notice_img')
  String noticeImg;

  @JsonKey(name: 'notice_name')
  String noticeName;

  @JsonKey(name: 'status')
  String status;

  @JsonKey(name: 'start_time')
  String startTime;

  @JsonKey(name: 'end_time')
  String endTime;

  NotifyItem(this.noticeType,this.noticeImg,this.noticeName,this.status,this.startTime,this.endTime,);

  factory NotifyItem.fromJson(Map<String, dynamic> srcJson) => _$NotifyItemFromJson(srcJson);

  Map<String, dynamic> toJson() => _$NotifyItemToJson(this);

}


@JsonSerializable()
class Pages extends Object {

  @JsonKey(name: 'count')
  int count;

  @JsonKey(name: 'page_size')
  int pageSize;

  @JsonKey(name: 'page')
  int page;

  Pages(this.count,this.pageSize,this.page,);

  factory Pages.fromJson(Map<String, dynamic> srcJson) => _$PagesFromJson(srcJson);

  Map<String, dynamic> toJson() => _$PagesToJson(this);

}


